package com.ruoyi.index.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.index.dto.CarouselDto;
import com.ruoyi.index.dto.GoodsCategoryDto;
import com.ruoyi.index.service.CarouselService;
import com.ruoyi.index.mapper.CarouselMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
* @author dell
* @description 针对表【ml_carousel(轮播图表)】的数据库操作Service实现
* @createDate 2025-03-19 10:59:45
*/
@Service
public class CarouselServiceImpl extends ServiceImpl<CarouselMapper, CarouselDto>
    implements CarouselService{
    @Autowired
    private CarouselMapper carouselMapper;


    @Override
    public List<CarouselDto> selectCarousel(Integer isOnline) {
        QueryWrapper<CarouselDto> qr = new QueryWrapper<>();
        qr.eq("is_online",isOnline);
        return carouselMapper.selectList(qr);
    }
}




